/*
 * copyright (c) 2009 Alexandr [Sn@ble] Surnin
 *
 * This file is part of FrameSeeker.
 *
 * FrameSeeker is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FrameSeeker is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You can read the full version of GNU LGPL in
 * http://www.gnu.org/copyleft/lesser.html
 */


#ifndef FSCORE_H
#define FSCORE_H

#include <QObject>
#include <QString>
#include <QSettings>
#include <QList>

#include "FSFrame.h"
#include "FSffmpeg.h"

#include "FSCoreMethod.h"
#include "FSMethodHist.h"
#include "FSMethodMV.h"



/** Frame Seeker main class
  * Makes work possible :-)
  * \author Alexandr [Sn@ble] Surnin
  */
class FSCore : public QObject {
    Q_OBJECT
public:
    FSCore();

public slots:

    /** Process the video input
      * \return Status
      */
    int process();


    /** Process the video input
      * \return Status
      * \param _fileName Name of the video file
      */
    int process( const QString &_fileName );


    /** Stop processing the video file
      * \return Status
      */
    int stop();


    /** Set the video file
      * \param _fileName Name of the video file
      */
    void setFile( const QString &_fileName );


    void readSettings();

    void loadMethods();

signals:
//    void sendFrames(const FSFrame &prev,
//                    const FSFrame &current,
//                    const FSFrame &next);

private:
    QString fileName;
    FSffmpeg *ffmpeg;
    QList<FSCoreMethod*> methods;

    QSettings *settings;
    QString method;

};

#endif // FSCORE_H
